public class TestDemo2 {
    public static void main(String[] args)  {
        MyThreadPool myThreadPool = new MyThreadPool(10);
        for(int i = 1; i < 100;i++) {
            int n = i;
            myThreadPool.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println("任务"+n);
                }
            });
        }
    }
}
